import request from '@/utils/request'


export default{
  //获取所有学科列表
    getSubjectList() {
        return request({
          url: '/eduService/subject/getSubjects',
          method: 'get',
        })
      },
      //添加番剧信息
    addCourseInfo(courseInfo) {
        return request({
          url: '/eduService/course/addCourseInfo',
          method: 'post',
          data:courseInfo
        })
      },
    //获取所有作者
    getAllTeacher() {
        return request({
          url: '/eduService/edu/findAll',
          method: 'get'
        })
      },
    //根据番剧id查询番剧信息
    getCourseInfo(courseId) {
      return request({
        url: `/eduService/course/getCourseInfo/${courseId}`,
        method: 'get'
      })
    },
    //修改番剧信息
    updateCourseInfo(courseInfo) {
      return request({
        url: '/eduService/course/updateCourseInfo',
        method: 'post',
        data:courseInfo
      })
    },
    //获取发布信息
    getPublishCourseInfo(courseId) {
      return request({
        url: `/eduService/course/getPublishCourseInfo/${courseId}`,
        method: 'get',
      })
    },
    //发布
    publishCourse(courseId) {
      return request({
        url: `/eduService/course/publishCourse/${courseId}`,
        method: 'post',
      })
    },
    getListCourse(current,limit,query) {
      return request({
        url: `/eduService/course/pageCondition/${current}/${limit}`,
        method: 'post',
        data: query
      })
    },
    removeCourseByCourseId(courseId) {
      return request({
        url: `/eduService/course/${courseId}`,
        method: 'delete',
      })
    },
}
